<script setup>
import { ref } from "vue";
import { useRouter } from "vue-router";

const routeList = useRouter();

let num = ref(0);

const myclick = function(coms) {
    num.value++
    console.log(num);
    routeList.push(coms)
};
</script>

<template>
  <div>
    <h1>这是App 根组件: element-plus</h1>
    <el-button @click="myclick('buttonmy')">按钮</el-button>
    <el-button @click="myclick('tablemy')">表格</el-button>
    <el-button @click="myclick('containermy')">布局容器</el-button>
    <el-button @click="myclick('iconmy')" icon="el-icon-eleme">icon图标</el-button>
    <el-button @click="myclick('datemy')" ><el-icon><clock/></el-icon>时间-日期</el-button>
    <el-button @click="myclick('formmy')" ><el-icon><ElementPlus /></el-icon>icon图标</el-button>
    <el-button @click="myclick('loadingmy')" ><el-icon><ElementPlus /></el-icon>加载中</el-button>
    <el-button @click="myclick('menumy')" ><el-icon><ElementPlus /></el-icon>导航栏</el-button>
    <hr />
    <router-view></router-view>
  </div>
</template>

<style scoped>
.red {
  color: red;
}
</style>
